package com.winshare.saleAssistant.dao;

import com.winshare.saleAssistant.domain.dto.req.MenuDTO;
import com.winshare.saleAssistant.domain.entity.AppDO;
import com.winshare.saleAssistant.domain.entity.AppMenuDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface AppMapper {
    
    int countByApp(AppDO appDO);

    int saveApp(AppDO appDO);

    int updateApp(AppDO appDO);

    List<AppDO> getAppDOList();

    AppDO getAppDO(AppDO appDO);

    int deleteApp(AppDO appDO);

    int saveAppMenu(@Param("appMenuDOList")List<AppMenuDO> appMenuDOList);

    int deleteAppMenuByApp(AppMenuDO appMenuDO);

    List<MenuDTO> getMenuListByApp(AppMenuDO appMenuDO);
}
